#include "RuntimeData.h"
#include "ConstantDefine.h"
#include "../share/user_define.h"

//-------------------------------------------------------------------------------
RuntimeData::RuntimeData()
{
	_safe_guard_begin;

	m_mapRuntimeData.clear();

	_safe_guard_end;

}

//-------------------------------------------------------------------------------
RuntimeData::~RuntimeData()
{

}

//-------------------------------------------------------------------------------
void RuntimeData::updateRankListCountAtRuntime(uint32_t type, uint32_t count)
{
	_safe_guard_begin;

	m_mapRuntimeData[type] = count;

	_safe_guard_end;
}

//-------------------------------------------------------------------------------
uint32_t RuntimeData::getRankRankListCountAtRuntime(uint32_t type)
{
	_safe_guard_begin;

	auto itor = m_mapRuntimeData.find(type);
	if (itor != m_mapRuntimeData.end())
	{
		return m_mapRuntimeData[type];
	}

	_safe_guard_end;

	return 0;
}
	
